﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NetworkPower.DataModel.Models.Mapping
{
    public class ElectricCableMap : EntityTypeConfiguration<ElectricCable>
    {
        public ElectricCableMap()
        {
            this.HasKey(t => t.ElectricCableId);
            this.ToTable("ElectricCables");

            this.Property(t => t.UnitId).HasColumnName("UnitId");
            this.Property(t=>t.CableNumber).HasColumnName("CableNumber");
            this.Property(t=>t.CableType).HasColumnName("CableType");
            this.Property(t=>t.BackUpCoreCount).HasColumnName("BackUpCoreCount");
            this.Property(t => t.StartCircleNo).HasColumnName("StartCircleNo");
            this.Property(t => t.StartTerminalNo).HasColumnName("StartTerminalNo");
            this.Property(t=>t.Start).HasColumnName("Start");
            this.Property(t => t.EndCircleNo).HasColumnName("EndCircleNo");
            this.Property(t => t.EndTerminalNo).HasColumnName("EndTerminalNo");
            this.Property(t => t.StartLoopLineId).HasColumnName("StartLoopLineId");
            this.Property(t => t.EndLoopLineId).HasColumnName("EndLoopLineId");
            this.Property(t=>t.End).HasColumnName("End");
            this.Property(t => t.LineLength).HasColumnName("LineLength");
            this.Property(t => t.Remarks).HasColumnName("Remarks");

            //this.Property(t => t.LoopLineId).HasColumnName("LoopLineId");
        }
    }
}
